package arena.utils;

import java.util.ArrayList;

public class CareTaker {
    private ArrayList<Object> savedStates = new ArrayList<Object>();
 
    public void addMemento(Object m) { savedStates.add(m); }
    public Object getMemento(int index) { return savedStates.get(index);
    
    }
    public Object getLastMemento(){
    	return savedStates.get(savedStates.size()-1);
    }
 }   
